#define  _CRT_SECURE_NO_WARNINGS

#include "Queue.h"

void TestQueue()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);
	QueuePush(&q, 6);
	while (!QueueEmpty(&q))
	{
		QueueNode* cur = q.phead;
		printf("%d ", cur->val);
		QueuePop(&q);
	}
	printf("\n");

	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);
	QueuePush(&q, 6);

	QDataType front = QueueFront(&q);
	printf("%d\n", front);

	QDataType tail = QueueBack(&q);
	printf("%d\n", tail);

	int size = QueueSize(&q);
	printf("%d\n", size);

	QueueDestroy(&q);
}

int main()
{
	TestQueue();

	return 0;
}